package com.xbongbong.pro.domain.entity;

import com.alibaba.fastjson.JSONArray;
import com.xbongbong.paas.toolbox.util.DateUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * @description: 首页看板
 * @Author: hongxiao
 * @date: 2019-02-26 15:35
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class IndexSetEntity extends Entity {
    /**
     * 主键id
     */
    private Long id;
    /**
     * 公司id
     */
    private String corpid;
    /**
     * 员工id
     */
    private String userId;
    /**
     * 看板类型：1web左侧看板，2web右侧看板，3app看板
     */
    private Integer boardType;
    /**
     * 个人配置
     */
    private JSONArray contentData;
    /**
     * 自定义首页标志，为1表示是，为null或者其他为否
     */
    private Integer customPageFlag;
    /**
     * 创建时间
     */
    private Long addTime;
    /**
     * 更新时间
     */
    private Long updateTime;
    /**
     * 删除标记
     */
    private Integer del;

    public IndexSetEntity() {
        long now = DateUtil.getInt();
        this.addTime = now;
        this.updateTime = now;
        this.del = 0;
    }

    public IndexSetEntity(String corpid, String userId, Integer boardType) {
        this();
        this.corpid = corpid;
        this.userId = userId;
        this.boardType = boardType;
    }

    public IndexSetEntity(String corpid, String userId, Integer boardType, JSONArray contentData) {
        this();
        this.corpid = corpid;
        this.userId = userId;
        this.boardType = boardType;
        this.contentData = contentData;
    }
    public IndexSetEntity(String corpid, String userId, Integer boardType, JSONArray contentData,Integer customPageFlag) {
        this();
        this.corpid = corpid;
        this.userId = userId;
        this.boardType = boardType;
        this.contentData = contentData;
        this.customPageFlag = customPageFlag;
    }
}
